package com.tom.feignclient;

import com.tom.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
* @Title:
* @Description: @FeignClient指定服务名 application name
* @Author: LT
* @Version: 1.0
* @Date:     
* @Parameters: 
* @Return 
*/
//@FeignClient("user-server")
@FeignClient(value = "user-server",fallbackFactory =  UserFeignClientFallback.class)
@RequestMapping("/user")
public interface UserFeignClient {
    @GetMapping("{id}")
    User getUser(@PathVariable Long id);
}
